package com.yunhe.java.pro13map;

/**
 * Created by Administrator on 2017/8/7 0007.
 */
public class UiClass implements Comparable<UiClass>{
    private String name;
    private int age;
    private int no;

    public UiClass() {}
    public UiClass(String name, int age, int no) {
        this.name = name;
        this.age = age;
        this.no = no;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getNo() {
        return no;
    }

    public void setNo(int no) {
        this.no = no;
    }

    @Override
    public int compareTo(UiClass o) {
        int i =0;
        if(o.getNo()>this.getNo()) {
            i = -1;
        }
        if(o.getNo()<this.getNo()){
            i=1;
        }
        return i;
    }
}
/*1.定义集合(ArrayList)存放UI班级学员(姓名、年龄、学号,并按照学号正序)
        2.定义集合(TreeSet)存放Java班级学员(姓名、年龄、学号,并按照学号正序)
        3.从控制台输入班级名称，展示出该班级的所有学员，若无该班级，则提示“没有该班级”*/
